import Vue from "vue";
import Router from "vue-router";
import Live from '@/views/live/layout.vue'
import Recommend from '@/views/live/recommend.vue'
import Video from '@/views/live/video.vue'
import videoNew from '@/views/liveNew/video.vue'
import Homerecommend from '@/views/live/homerecommend.vue'
import Collection from '@/views/live/collection.vue'
import error from '@/views/liveNew/errorPage.vue'
Vue.use(Router);

export default new Router({
  // mode: "history",
  base: process.env.BASE_URL,
  routes: [
    {
      path:'/',
      redirect: '/live',
    },
    {
      path:'/liveNew',
      component: videoNew,
    },
    {
      path:'/error',
      component: error,
    },
    {
      path: "/live",
      redirect: '/live/recommend',
      component: Live,
      children:[
        {
          name:'recommend',
          path: "recommend",
          component: Recommend,
        },
        {
          name:'video',
          path: "video",
          component: Video,
        },
        {
          name:'homerecommend',
          path: "homerecommend",
          component: Homerecommend,
        },
        {
          name:'collection',
          path: "collection",
          component: Collection,
        },
      ]
    }
  ]
})
